/*
 * WorksAgent.java
 *
 *
 * To change this template, choose Tools | Template Manager
 * and open the template in the editor.
 */

package info.mikrotubula.agents;

import info.mikrotubula.db.Users;
import info.mikrotubula.db.Works;
import info.mikrotubula.managers.WorkManagerLocal;
import java.util.Date;
import javax.ejb.EJB;

/**
 *
 * @author Krystian
 */
public class WorksAgent {

    @EJB
    private WorkManagerLocal workManagerBean;
    private String workName;
    private String workDescription;
    private Date workDate;
    private Users user;
    
    /** Creates a new instance of WorksAgent */
    public WorksAgent() {
    }
    
    public Works create() {
        return workManagerBean.create(getWorkName(), getWorkDescription(), getWorkDate(), getUser());
    }

    public String getWorkName() {
        return workName;
    }

    public void setWorkName(String workName) {
        this.workName = workName;
    }

    public String getWorkDescription() {
        return workDescription;
    }

    public void setWorkDescription(String workDescription) {
        this.workDescription = workDescription;
    }

    public Date getWorkDate() {
        return workDate;
    }

    public void setWorkDate(Date workDate) {
        this.workDate = workDate;
    }

    public Users getUser() {
        return user;
    }

    public void setUser(Users user) {
        this.user = user;
    }
    
}
